home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbunrar / frmmain.frm (.txt) < prev    next >
Visual Basic Form  |  1999-09-11  |  6KB  |  197 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    Caption         =   "vbunrar"
  4.    ClientHeight    =   2370
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   9735
  8.    Icon            =   "frmMain.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2370
  11.    ScaleWidth      =   9735
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton cmdAbort 
  14.       Caption         =   "&Abort"
  15.       Enabled         =   0   'False
  16.       Height          =   375
  17.       Left            =   7800
  18.       TabIndex        =   8
  19.       Top             =   600
  20.       Width           =   1815
  21.    End
  22.    Begin VB.PictureBox picRarProc 
  23.       AutoRedraw      =   -1  'True
  24.       Height          =   255
  25.       Left            =   120
  26.       ScaleHeight     =   195
  27.       ScaleWidth      =   9435
  28.       TabIndex        =   7
  29.       Top             =   1800
  30.       Width           =   9495
  31.       Begin VB.Label lblRarProc 
  32.          Alignment       =   2  'Center
  33.          BackStyle       =   0  'Transparent
  34.          Caption         =   "lblRarProc"
  35.          ForeColor       =   &H8000000E&
  36.          Height          =   255
  37.          Left            =   4080
  38.          TabIndex        =   9
  39.          Top             =   0
  40.          Width           =   855
  41.       End
  42.    End
  43.    Begin VB.CommandButton cmdStart 
  44.       Caption         =   "&Start"
  45.       Height          =   375
  46.       Left            =   7800
  47.       TabIndex        =   2
  48.       Top             =   120
  49.       Width           =   1815
  50.    End
  51.    Begin VB.TextBox txtDestPath 
  52.       Height          =   285
  53.       Left            =   1320
  54.       TabIndex        =   1
  55.       Text            =   "txtDestPath"
  56.       Top             =   480
  57.       Width           =   6135
  58.    End
  59.    Begin VB.TextBox txtArchPath 
  60.       Height          =   285
  61.       Left            =   1320
  62.       TabIndex        =   0
  63.       Text            =   "txtArchPath"
  64.       Top             =   120
  65.       Width           =   6135
  66.    End
  67.    Begin VB.Label Label2 
  68.       Alignment       =   1  'Right Justify
  69.       AutoSize        =   -1  'True
  70.       Caption         =   "Extracting from :"
  71.       Height          =   195
  72.       Left            =   120
  73.       TabIndex        =   11
  74.       Top             =   1200
  75.       Width           =   1140
  76.    End
  77.    Begin VB.Label Label1 
  78.       Alignment       =   1  'Right Justify
  79.       AutoSize        =   -1  'True
  80.       Caption         =   "Extracting file :"
  81.       Height          =   195
  82.       Left            =   240
  83.       TabIndex        =   10
  84.       Top             =   1440
  85.       Width           =   1035
  86.    End
  87.    Begin VB.Label lblRarArch 
  88.       BackStyle       =   0  'Transparent
  89.       Caption         =   "lblRarArch"
  90.       Height          =   255
  91.       Left            =   1320
  92.       TabIndex        =   6
  93.       Top             =   1200
  94.       Width           =   8295
  95.    End
  96.    Begin VB.Label lblRarFile 
  97.       BackStyle       =   0  'Transparent
  98.       Caption         =   "lblRarFile"
  99.       Height          =   255
  100.       Left            =   1320
  101.       TabIndex        =   5
  102.       Top             =   1440
  103.       Width           =   8295
  104.    End
  105.    Begin VB.Line Line1 
  106.       BorderColor     =   &H80000014&
  107.       Index           =   3
  108.       X1              =   -240
  109.       X2              =   10920
  110.       Y1              =   2175
  111.       Y2              =   2175
  112.    End
  113.    Begin VB.Line Line1 
  114.       BorderColor     =   &H80000010&
  115.       Index           =   2
  116.       X1              =   -240
  117.       X2              =   10920
  118.       Y1              =   2160
  119.       Y2              =   2160
  120.    End
  121.    Begin VB.Line Line1 
  122.       BorderColor     =   &H80000014&
  123.       Index           =   1
  124.       X1              =   -120
  125.       X2              =   11040
  126.       Y1              =   1095
  127.       Y2              =   1095
  128.    End
  129.    Begin VB.Line Line1 
  130.       BorderColor     =   &H80000010&
  131.       Index           =   0
  132.       X1              =   -120
  133.       X2              =   11040
  134.       Y1              =   1080
  135.       Y2              =   1080
  136.    End
  137.    Begin VB.Label Label5 
  138.       Alignment       =   1  'Right Justify
  139.       BackStyle       =   0  'Transparent
  140.       Caption         =   "Target Path:"
  141.       Height          =   255
  142.       Left            =   120
  143.       TabIndex        =   4
  144.       Top             =   480
  145.       Width           =   1095
  146.    End
  147.    Begin VB.Label Label4 
  148.       Alignment       =   1  'Right Justify
  149.       BackStyle       =   0  'Transparent
  150.       Caption         =   "Archive Path:"
  151.       Height          =   255
  152.       Left            =   240
  153.       TabIndex        =   3
  154.       Top             =   120
  155.       Width           =   975
  156.    End
  157. Attribute VB_Name = "frmMain"
  158. Attribute VB_GlobalNameSpace = False
  159. Attribute VB_Creatable = False
  160. Attribute VB_PredeclaredId = True
  161. Attribute VB_Exposed = False
  162. Option Explicit
  163. '/ vbUnrar by EwareZ
  164. Private Sub cmdAbort_Click()
  165.  RAR_ABORT = True
  166.  MsgBox "Extracting Aborted!", vbInformation
  167. ' clear picturebox and labels
  168.  picRarProc.Line (0, 0)-(picRarProc.Width, picRarProc.Height), picRarProc.BackColor, BF
  169.  lblRarProc = "0%"
  170.  lblRarFile = ""
  171.  lblRarArch = ""
  172.  cmdAbort.Enabled = False
  173.  cmdStart.Enabled = True
  174. End Sub
  175. Private Sub cmdStart_Click()
  176.  cmdStart.Enabled = False
  177.  cmdAbort.Enabled = True
  178. '/ The extractRar function:
  179. '/ sExtractDir = path to extract to - example: "C:\TEMP\"
  180. '/ sArchName   = path to rararchive - example: "C:\TEST.RAR"
  181. '/ lblRarFile  = label where the current filename will be displayed
  182. '/ lblRarArch  = label where the current archivename will be displayed
  183. '/ lblRarProc  = label where the total percent will be displayed
  184. '/ picRarProc  = picturebox where the total percent will be displayed (progressbar)
  185. '/ sRarPassword = [Optional] use this if archive is password protected - example: "password"
  186.  ExtractRAR txtDestPath.Text, txtArchPath.Text, lblRarFile, lblRarArch, lblRarProc, picRarProc
  187.  cmdAbort.Enabled = False
  188.  cmdStart.Enabled = True
  189. End Sub
  190. Private Sub Form_Load()
  191.  txtArchPath.Text = "example\example.rar"
  192.  txtDestPath.Text = "unpacked\"
  193.  lblRarProc = "0%"
  194.  lblRarFile = ""
  195.  lblRarArch = ""
  196. End Sub
  197.